package com.smart.cloud.gateway.fliter;

import org.springframework.cloud.gateway.filter.ratelimit.KeyResolver;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;


public class UserResolver implements KeyResolver {
    @Override
    public Mono<String> resolve(ServerWebExchange exchange) {
        String uid = exchange.getRequest().getQueryParams().getFirst("uid");
        return Mono.just(uid);
    }
}
